<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>InfTcpConnection</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.0">
<link rel="home" href="index.html" title="libinfinity-0.4 Reference Manual">
<link rel="up" href="ch02.html" title="Common libinfinity API">
<link rel="prev" href="libinfinity-0.4-InfIpAddress.html" title="InfIpAddress">
<link rel="next" href="InfXmlConnection.html" title="InfXmlConnection">
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libinfinity-0.4-InfIpAddress.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libinfinity-0.4 Reference Manual</th>
<td><a accesskey="n" href="InfXmlConnection.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#InfTcpConnection.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#InfTcpConnection.description" class="shortcut">Description</a>
                   | 
                  <a href="#InfTcpConnection.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#InfTcpConnection.properties" class="shortcut">Properties</a>
                   | 
                  <a href="#InfTcpConnection.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry" title="InfTcpConnection">
<a name="InfTcpConnection"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="InfTcpConnection.top_of_page"></a>InfTcpConnection</span></h2>
<p>InfTcpConnection</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="InfTcpConnection.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">enum                <a class="link" href="InfTcpConnection.html#InfTcpConnectionStatus" title="enum InfTcpConnectionStatus">InfTcpConnectionStatus</a>;
                    <a class="link" href="InfTcpConnection.html#InfTcpConnection-struct" title="InfTcpConnection">InfTcpConnection</a>;
                    <a class="link" href="InfTcpConnection.html#InfTcpConnectionClass" title="InfTcpConnectionClass">InfTcpConnectionClass</a>;
<a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="returnvalue">InfTcpConnection</span></a> *  <a class="link" href="InfTcpConnection.html#inf-tcp-connection-new" title="inf_tcp_connection_new ()">inf_tcp_connection_new</a>              (<em class="parameter"><code><a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> *io</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libinfinity-0.4-InfIpAddress.html#InfIpAddress" title="InfIpAddress"><span class="type">InfIpAddress</span></a> *remote_addr</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> remote_port</code></em>);
<a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="returnvalue">InfTcpConnection</span></a> *  <a class="link" href="InfTcpConnection.html#inf-tcp-connection-new-and-open" title="inf_tcp_connection_new_and_open ()">inf_tcp_connection_new_and_open</a>     (<em class="parameter"><code><a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> *io</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libinfinity-0.4-InfIpAddress.html#InfIpAddress" title="InfIpAddress"><span class="type">InfIpAddress</span></a> *remote_addr</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> remote_port</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="InfTcpConnection.html#inf-tcp-connection-open" title="inf_tcp_connection_open ()">inf_tcp_connection_open</a>             (<em class="parameter"><code><a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfTcpConnection.html#inf-tcp-connection-close" title="inf_tcp_connection_close ()">inf_tcp_connection_close</a>            (<em class="parameter"><code><a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *connection</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfTcpConnection.html#inf-tcp-connection-send" title="inf_tcp_connection_send ()">inf_tcp_connection_send</a>             (<em class="parameter"><code><a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);
<a class="link" href="libinfinity-0.4-InfIpAddress.html#InfIpAddress" title="InfIpAddress"><span class="returnvalue">InfIpAddress</span></a> *      <a class="link" href="InfTcpConnection.html#inf-tcp-connection-get-remote-address" title="inf_tcp_connection_get_remote_address ()">inf_tcp_connection_get_remote_address</a>
                                                        (<em class="parameter"><code><a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *connection</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="InfTcpConnection.html#inf-tcp-connection-get-remote-port" title="inf_tcp_connection_get_remote_port ()">inf_tcp_connection_get_remote_port</a>  (<em class="parameter"><code><a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *connection</code></em>);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="InfTcpConnection.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----InfTcpConnection
</pre>
</div>
<div class="refsect1" title="Properties">
<a name="InfTcpConnection.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="InfTcpConnection.html#InfTcpConnection--device-index" title='The "device-index" property'>device-index</a>"             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write
  "<a class="link" href="InfTcpConnection.html#InfTcpConnection--device-name" title='The "device-name" property'>device-name</a>"              <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write
  "<a class="link" href="InfTcpConnection.html#InfTcpConnection--io" title='The "io" property'>io</a>"                       <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a>*                : Read / Write / Construct Only
  "<a class="link" href="InfTcpConnection.html#InfTcpConnection--local-address" title='The "local-address" property'>local-address</a>"            <a class="link" href="libinfinity-0.4-InfIpAddress.html#InfIpAddress" title="InfIpAddress"><span class="type">InfIpAddress</span></a>*         : Read
  "<a class="link" href="InfTcpConnection.html#InfTcpConnection--local-port" title='The "local-port" property'>local-port</a>"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read
  "<a class="link" href="InfTcpConnection.html#InfTcpConnection--remote-address" title='The "remote-address" property'>remote-address</a>"           <a class="link" href="libinfinity-0.4-InfIpAddress.html#InfIpAddress" title="InfIpAddress"><span class="type">InfIpAddress</span></a>*         : Read / Write
  "<a class="link" href="InfTcpConnection.html#InfTcpConnection--remote-port" title='The "remote-port" property'>remote-port</a>"              <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write
  "<a class="link" href="InfTcpConnection.html#InfTcpConnection--status" title='The "status" property'>status</a>"                   <a class="link" href="InfTcpConnection.html#InfTcpConnectionStatus" title="enum InfTcpConnectionStatus"><span class="type">InfTcpConnectionStatus</span></a>  : Read
</pre>
</div>
<div class="refsect1" title="Signals">
<a name="InfTcpConnection.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="InfTcpConnection.html#InfTcpConnection-error" title='The "error" signal'>error</a>"                                          : Run Last
  "<a class="link" href="InfTcpConnection.html#InfTcpConnection-received" title='The "received" signal'>received</a>"                                       : Run Last
  "<a class="link" href="InfTcpConnection.html#InfTcpConnection-sent" title='The "sent" signal'>sent</a>"                                           : Run Last
</pre>
</div>
<div class="refsect1" title="Description">
<a name="InfTcpConnection.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="InfTcpConnection.details"></a><h2>Details</h2>
<div class="refsect2" title="enum InfTcpConnectionStatus">
<a name="InfTcpConnectionStatus"></a><h3>enum InfTcpConnectionStatus</h3>
<pre class="programlisting">typedef enum _InfTcpConnectionStatus {
  INF_TCP_CONNECTION_CONNECTING,
  INF_TCP_CONNECTION_CONNECTED,
  INF_TCP_CONNECTION_CLOSED
} InfTcpConnectionStatus;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="InfTcpConnection">
<a name="InfTcpConnection-struct"></a><h3>InfTcpConnection</h3>
<pre class="programlisting">typedef struct _InfTcpConnection InfTcpConnection;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="InfTcpConnectionClass">
<a name="InfTcpConnectionClass"></a><h3>InfTcpConnectionClass</h3>
<pre class="programlisting">typedef struct {
  GObjectClass parent_class;

  /* Signals */
  void (*sent)(InfTcpConnection* connection,
               gconstpointer data,
               guint len);

  void (*received)(InfTcpConnection* connection,
                   gconstpointer data,
                   guint len);

  void (*error)(InfTcpConnection* connection,
                GError* error);
} InfTcpConnectionClass;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="inf_tcp_connection_new ()">
<a name="inf-tcp-connection-new"></a><h3>inf_tcp_connection_new ()</h3>
<pre class="programlisting"><a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="returnvalue">InfTcpConnection</span></a> *  inf_tcp_connection_new              (<em class="parameter"><code><a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> *io</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libinfinity-0.4-InfIpAddress.html#InfIpAddress" title="InfIpAddress"><span class="type">InfIpAddress</span></a> *remote_addr</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> remote_port</code></em>);</pre>
<p>
Creates a new <a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a>. The arguments are stored as properties for
an eventual <a class="link" href="InfTcpConnection.html#inf-tcp-connection-open" title="inf_tcp_connection_open ()"><code class="function">inf_tcp_connection_open()</code></a> call, this function itself does not
establish a connection.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>io</code></em> :</span></p></td>
<td>A <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> object used to watch for activity.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>remote_addr</code></em> :</span></p></td>
<td>The address to eventually connect to.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>remote_port</code></em> :</span></p></td>
<td>The port to eventually connect to.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A new <a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a>. Free with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_tcp_connection_new_and_open ()">
<a name="inf-tcp-connection-new-and-open"></a><h3>inf_tcp_connection_new_and_open ()</h3>
<pre class="programlisting"><a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="returnvalue">InfTcpConnection</span></a> *  inf_tcp_connection_new_and_open     (<em class="parameter"><code><a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> *io</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libinfinity-0.4-InfIpAddress.html#InfIpAddress" title="InfIpAddress"><span class="type">InfIpAddress</span></a> *remote_addr</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> remote_port</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Creates a new <a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> and connects it to the given TCP endpoint.
Like inf_tcp_connection_new, but calls <a class="link" href="InfTcpConnection.html#inf-tcp-connection-open" title="inf_tcp_connection_open ()"><code class="function">inf_tcp_connection_open()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>io</code></em> :</span></p></td>
<td>A <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a> object used to watch for activity.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>remote_addr</code></em> :</span></p></td>
<td>The address to connect to.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>remote_port</code></em> :</span></p></td>
<td>The port to connect to.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Location to store error information.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A new <a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. Free with
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_tcp_connection_open ()">
<a name="inf-tcp-connection-open"></a><h3>inf_tcp_connection_open ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            inf_tcp_connection_open             (<em class="parameter"><code><a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Attempts to open <em class="parameter"><code>connection</code></em>. Make sure to have set the "remote-address"
and "remote-port" property before calling this function. If an error
occurs, the function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and <em class="parameter"><code>error</code></em> is set. Note however that
the connection might not be fully open when the function returns
(check the "status" property if you need to know). If an asynchronous
error occurs while the connection is being opened, the "error" signal
is emitted.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Location to store error information.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if an error occured and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> otherwise.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_tcp_connection_close ()">
<a name="inf-tcp-connection-close"></a><h3>inf_tcp_connection_close ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_tcp_connection_close            (<em class="parameter"><code><a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *connection</code></em>);</pre>
<p>
Closes a TCP connection that is either open or currently connecting.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_tcp_connection_send ()">
<a name="inf-tcp-connection-send"></a><h3>inf_tcp_connection_send ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_tcp_connection_send             (<em class="parameter"><code><a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *connection</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>);</pre>
<p>
Sends data through the TCP connection. The data is not sent immediately,
but enqueued to a buffer and will be sent as soon as kernel space
becomes available. The "sent" signal will be emitted when data has
really been sent.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> with status <code class="literal">INF_TCP_CONNECTION_CONNECTED</code>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>The data to send.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>Number of bytes to send.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_tcp_connection_get_remote_address ()">
<a name="inf-tcp-connection-get-remote-address"></a><h3>inf_tcp_connection_get_remote_address ()</h3>
<pre class="programlisting"><a class="link" href="libinfinity-0.4-InfIpAddress.html#InfIpAddress" title="InfIpAddress"><span class="returnvalue">InfIpAddress</span></a> *      inf_tcp_connection_get_remote_address
                                                        (<em class="parameter"><code><a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *connection</code></em>);</pre>
<p>
Returns the IP address of the remote site.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a class="link" href="libinfinity-0.4-InfIpAddress.html#InfIpAddress" title="InfIpAddress"><span class="type">InfIpAddress</span></a> owned by <em class="parameter"><code>connection</code></em>. You do not need to
free it, but need to make your own copy if you want to keep it longer than
<em class="parameter"><code>connection</code></em>'s lifetime.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_tcp_connection_get_remote_port ()">
<a name="inf-tcp-connection-get-remote-port"></a><h3>inf_tcp_connection_get_remote_port ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               inf_tcp_connection_get_remote_port  (<em class="parameter"><code><a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *connection</code></em>);</pre>
<p>
Returns the port of the remote site to which <em class="parameter"><code>connection</code></em> is (or was)
connected or connecting.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The port of the remote site.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="Property Details">
<a name="InfTcpConnection.property-details"></a><h2>Property Details</h2>
<div class="refsect2" title='The "device-index" property'>
<a name="InfTcpConnection--device-index"></a><h3>The <code class="literal">"device-index"</code> property</h3>
<pre class="programlisting">  "device-index"             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write</pre>
<p>The index of the device to use for the connection.</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2" title='The "device-name" property'>
<a name="InfTcpConnection--device-name"></a><h3>The <code class="literal">"device-name"</code> property</h3>
<pre class="programlisting">  "device-name"              <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write</pre>
<p>The name of the device to use for the connection, such as `eth0'.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2" title='The "io" property'>
<a name="InfTcpConnection--io"></a><h3>The <code class="literal">"io"</code> property</h3>
<pre class="programlisting">  "io"                       <a class="link" href="InfIo.html" title="InfIo"><span class="type">InfIo</span></a>*                : Read / Write / Construct Only</pre>
<p>I/O handler.</p>
</div>
<hr>
<div class="refsect2" title='The "local-address" property'>
<a name="InfTcpConnection--local-address"></a><h3>The <code class="literal">"local-address"</code> property</h3>
<pre class="programlisting">  "local-address"            <a class="link" href="libinfinity-0.4-InfIpAddress.html#InfIpAddress" title="InfIpAddress"><span class="type">InfIpAddress</span></a>*         : Read</pre>
<p>The local address of the connection.</p>
</div>
<hr>
<div class="refsect2" title='The "local-port" property'>
<a name="InfTcpConnection--local-port"></a><h3>The <code class="literal">"local-port"</code> property</h3>
<pre class="programlisting">  "local-port"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read</pre>
<p>The local port of the connection.</p>
<p>Allowed values: &lt;= 65535</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2" title='The "remote-address" property'>
<a name="InfTcpConnection--remote-address"></a><h3>The <code class="literal">"remote-address"</code> property</h3>
<pre class="programlisting">  "remote-address"           <a class="link" href="libinfinity-0.4-InfIpAddress.html#InfIpAddress" title="InfIpAddress"><span class="type">InfIpAddress</span></a>*         : Read / Write</pre>
<p>Address to connect to.</p>
</div>
<hr>
<div class="refsect2" title='The "remote-port" property'>
<a name="InfTcpConnection--remote-port"></a><h3>The <code class="literal">"remote-port"</code> property</h3>
<pre class="programlisting">  "remote-port"              <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write</pre>
<p>Port to connect to.</p>
<p>Allowed values: &lt;= 65535</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2" title='The "status" property'>
<a name="InfTcpConnection--status"></a><h3>The <code class="literal">"status"</code> property</h3>
<pre class="programlisting">  "status"                   <a class="link" href="InfTcpConnection.html#InfTcpConnectionStatus" title="enum InfTcpConnectionStatus"><span class="type">InfTcpConnectionStatus</span></a>  : Read</pre>
<p>Status of the TCP connection.</p>
<p>Default value: INF_TCP_CONNECTION_CLOSED</p>
</div>
</div>
<div class="refsect1" title="Signal Details">
<a name="InfTcpConnection.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2" title='The "error" signal'>
<a name="InfTcpConnection-error"></a><h3>The <code class="literal">"error"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *connection,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>          error,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>          user_data)       : Run Last</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>The erroneous <a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A pointer to a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> object with details on the error
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title='The "received" signal'>
<a name="InfTcpConnection-received"></a><h3>The <code class="literal">"received"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *connection,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>          data,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>             length,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>          user_data)       : Run Last</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>The <a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> through which the data has been received
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> refering to the data that has been received
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> holding the number of bytes that has been received
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title='The "sent" signal'>
<a name="InfTcpConnection-sent"></a><h3>The <code class="literal">"sent"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> *connection,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>          data,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>             length,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>          user_data)       : Run Last</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>The <a class="link" href="InfTcpConnection.html" title="InfTcpConnection"><span class="type">InfTcpConnection</span></a> through which the data has been sent
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> refering to the data that has been sent
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> holding the number of bytes that has been sent
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.15</div>
</body>
</html>